import server from '@/utils/fetch.js'
export const getAccount = () => {
    return server.get('/v1/account', {
        params: {
            userid: localStorage.getItem('patient_id')
        }
    })
}

export const getDAccount = () => {
    return server.get('/v1/account', {
        params: {
            userid: localStorage.getItem('doctor_id')
        }
    })
}

export const getPurchaseHistory = () => {
    return server.get('/v1/purchasehistory', {
        params: {
            userid: localStorage.getItem('patient_id')
        }
    })
}

export const alipay = (money) => {
    return server.post('/v1/purchasehistory', {
        money,
        params: {
            userid: localStorage.getItem('patient_id')
        }
    })
}
